<?php
$path = $_GET['path'];
$id = $_GET['id'];
if (!$path && $id)
{
	include_once('model/photo.php');
	$photo = new LZ_Photo;
	$arr = $photo->get_one($id);
	$path = $arr['big'];
}

if (!$path || !file_exists($path)) die('error');

$imgarr = @getimagesize($path);
$view_data['width'] = $imgarr[0];
$view_data['height'] = $imgarr[1];
$view_data['path'] = $path;
?>